﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace GestorDeFlotasDesktop.MejoresChoferes
{
    public partial class MejoresChoferes : MasterPage
    {
        int triIni;
        int triFin;
        int anio;
        public capaDatos.SQLSyntaxisGeneration est_choferCD = new capaDatos.SQLSyntaxisGeneration();
        DataTable est_chofer;

        Form ventanPadre;
        public MejoresChoferes(Form ventanaParam, int TrimestreIni,int TrimestreFin, int añoSelected)
        {
            InitializeComponent();
            dataGridView1.Visible = true;
            ocultarMenu(ref ventanPadre, ventanaParam);
            triIni = TrimestreIni;
            triFin = TrimestreFin;
            anio = añoSelected;
        }

        private void MejoresChoferes_FormClosing(object sender, FormClosingEventArgs e)
        {
            ventanPadre.Visible = true;
        }

        private void MejoresChoferes_Load(object sender, EventArgs e)
        {
            ArrayList parametros=new ArrayList();
        
           parametros = parametrosStoredProcedure(paramsNames("anio","mesIni","mesFin"),paramsValues(anio,triIni,triFin));
           est_chofer =est_choferCD.executeSp("pelusa.mejoresChoferes",parametros);
           this.dataGridView1.DataSource = est_chofer;
           this.dataGridView1.AutoResizeColumns();

        }

        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {

            
        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void dataGridView1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {

        }
            }
}
